
<template>
<div>
  <h2>父组件</h2>
  <div>
    接收子组件的msg：{{ msg }}
  </div>

  <br>
  <hr>
  <br>
  <Child @sendMsg="getMsg"/>
</div>
</template>
<script setup lang="ts">

import Child from '@views/communication/02_custom-event/Child.vue'
const msg = ref('')
const getMsg = (val:string)=>{
  msg.value = val
}
</script>

<style scoped>

</style>
